<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>🎀 Princess Birthday Wishes 🎀</title>
    <link href="https://fonts.googleapis.com/css2?family=Dancing+Script&family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@400;700&family=ZCOOL+KuaiLe&family=ZCOOL+QingKe+HuangYou&display=swap" rel="stylesheet">
    <style>
        :root {
            --primary-color: #ff9ecd;
            --secondary-color: #ffd1dc;
            --accent-color: #ffb6c1;
            --text-color: #4a4a4a;
            --gold-color: #ffd700;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            min-height: 100vh;
            background: linear-gradient(135deg, #fff6f8, #ffe6ea);
            font-family: 'Noto Serif SC', serif;
            overflow-x: hidden;
        }

        .sparkles {
            position: fixed;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
        }

        .sparkle {
            position: absolute;
            background: white;
            border-radius: 50%;
            animation: sparkle-float 3s ease-in-out infinite;
        }

        @keyframes sparkle-float {
            0%, 100% {
                transform: translateY(0) scale(1);
                opacity: 0;
            }
            50% {
                transform: translateY(-20px) scale(1.2);
                opacity: 1;
            }
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem;
            position: relative;
            z-index: 2;
        }

        .princess-card {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 30px;
            box-shadow: 0 15px 35px rgba(255, 182, 193, 0.3);
            padding: 3rem;
            margin: 2rem auto;
            max-width: 900px;
            position: relative;
            overflow: hidden;
        }

        .princess-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, var(--primary-color), var(--gold-color), var(--primary-color));
            animation: shimmer 2s linear infinite;
        }

        @keyframes shimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }

        .header {
            text-align: center;
            margin-bottom: 3rem;
        }

        .title {
            font-family: 'Dancing Script', cursive;
            font-size: 4rem;
            color: var(--primary-color);
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
            animation: title-glow 2s ease-in-out infinite;
        }

        @keyframes title-glow {
            0%, 100% {
                text-shadow: 0 0 5px var(--primary-color),
                           0 0 10px var(--primary-color),
                           0 0 15px var(--primary-color);
            }
            50% {
                text-shadow: 0 0 20px var(--primary-color),
                           0 0 35px var(--primary-color),
                           0 0 40px var(--primary-color);
            }
        }

        .photo-gallery {
            position: relative;
            width: 100%;
            height: 500px;
            margin: 3rem 0;
            perspective: 1000px;
            transform-style: preserve-3d;
        }

        .photo-container {
            position: relative;
            width: 100%;
            height: 100%;
            transform-style: preserve-3d;
            animation: photoRotate 30s infinite linear;
        }

        .photo-item {
            position: absolute;
            width: 200px;
            height: 200px;
            left: 50%;
            top: 50%;
            transform-style: preserve-3d;
            transition: transform 0.5s;
            cursor: pointer;
        }

        .photo-item:hover {
            transform: scale(1.2) translateZ(50px);
        }

        .photo-front,
        .photo-back {
            position: absolute;
            width: 100%;
            height: 100%;
            backface-visibility: hidden;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
        }

        .photo-front {
            transform: rotateY(0deg);
            background: var(--secondary-color);
        }

        .photo-back {
            transform: rotateY(180deg);
            background: var(--accent-color);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            text-align: center;
            color: white;
            font-size: 0.9rem;
        }

        .photo-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 15px;
            transition: transform 0.3s;
        }

        @keyframes photoRotate {
            from { transform: rotateY(0deg); }
            to { transform: rotateY(360deg); }
        }

        @keyframes float-photo {
            0%, 100% { transform: translateZ(0); }
            50% { transform: translateZ(50px); }
        }

        .message {
            font-family: 'ZCOOL KuaiLe', 'Ma Shan Zheng', cursive;
            font-size: 1.3rem;
            line-height: 2;
            color: var(--text-color);
            text-align: center;
            margin: 3rem 0;
            padding: 2rem;
            background: rgba(255, 255, 255, 0.8);
            border-radius: 20px;
            box-shadow: 0 5px 15px rgba(255, 182, 193, 0.2);
            animation: message-fade 1.5s ease-in-out;
        }

        .message .highlight {
            color: var(--primary-color);
            font-size: 1.4rem;
            font-weight: bold;
            text-shadow: 0 0 5px rgba(255, 182, 193, 0.5);
        }

        .message .quote {
            font-family: 'ZCOOL QingKe HuangYou', cursive;
            font-size: 1.2rem;
            color: #666;
            font-style: italic;
            margin: 1rem 0;
            padding: 0.5rem 2rem;
            border-left: 3px solid var(--primary-color);
            background: rgba(255, 255, 255, 0.5);
        }

        .message p {
            margin: 0.8rem 0;
            transition: transform 0.3s;
        }

        .message p:hover {
            transform: translateY(-2px);
            color: var(--primary-color);
        }

        .stamp {
            position: relative;
            width: 120px;
            height: 120px;
            margin: 30px auto 0;
            animation: stamp-appear 1s ease-out;
        }

        .stamp-circle {
            position: absolute;
            width: 100%;
            height: 100%;
            border: 3px solid var(--primary-color);
            border-radius: 50%;
            animation: stamp-rotate 30s linear infinite;
        }

        .stamp-inner {
            position: absolute;
            width: 90%;
            height: 90%;
            left: 5%;
            top: 5%;
            border: 2px solid var(--primary-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Ma Shan Zheng', cursive;
            font-size: 1.2rem;
            color: var(--primary-color);
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
            background: rgba(255, 255, 255, 0.9);
            transform: rotate(-15deg);
        }

        .stamp-text {
            text-align: center;
            line-height: 1.5;
        }

        @keyframes stamp-appear {
            from {
                opacity: 0;
                transform: scale(0) rotate(-180deg);
            }
            to {
                opacity: 1;
                transform: scale(1) rotate(0);
            }
        }

        @keyframes stamp-rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .decorations {
            position: absolute;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }

        .decoration {
            position: absolute;
            animation: float 3s ease-in-out infinite;
        }

        .crown {
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 3rem;
        }

        .hearts {
            position: absolute;
            font-size: 1.5rem;
        }

        .heart1 { top: 10%; left: 10%; animation-delay: 0.2s; }
        .heart2 { top: 20%; right: 15%; animation-delay: 0.5s; }
        .heart3 { bottom: 15%; left: 20%; animation-delay: 0.8s; }
        .heart4 { bottom: 25%; right: 10%; animation-delay: 1.1s; }

        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-15px); }
        }

        .music-control {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 100;
            background: var(--primary-color);
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            transition: transform 0.3s;
        }

        .music-control:hover {
            transform: scale(1.1);
        }

        @media (max-width: 768px) {
            .title {
                font-size: 2.5rem;
            }

            .photo-gallery {
                height: 300px;
            }

            .message {
                font-size: 1rem;
                padding: 1rem;
            }
        }
    </style>
</head>
<body>
    <div class="sparkles" id="sparkles"></div>
    
    <div class="container">
        <div class="princess-card">
            <div class="decorations">
                <div class="decoration crown">👑</div>
                <div class="decoration hearts heart1">💖</div>
                <div class="decoration hearts heart2">💝</div>
                <div class="decoration hearts heart3">💕</div>
                <div class="decoration hearts heart4">💗</div>
            </div>

            <div class="header">
                <h1 class="title">Happy Birthday Princess</h1>
            </div>

            <div class="photo-gallery">
                <div class="photo-container" id="photoContainer">
                    <!-- 照片将通过JavaScript动态添加 -->
                </div>
            </div>

            <div class="message">
                <p class="highlight">✨ 亲爱的大脸蛋妹妹 ✨</p>
                <p>在这个特别的日子里，</p>
                <p>愿你永远保持那份追求知识的热情，</p>
                <p>像晨曦中绽放的花朵一样明媚动人。</p>
                <div class="quote">
                    "青春是一个奋斗的故事，</br>
                    未来是一个梦想的舞台。"
                </div>
                <p>愿你在大学的旅程中，</p>
                <p>遇见更好的自己，</p>
                <p>收获珍贵的友情，</p>
                <p>创造属于你的精彩故事。</p>
                <p>愿你的付出都开花结果，</p>
                <p>愿你的梦想都能实现，</p>
                <p>愿你在知识的海洋中乘风破浪，</p>
                <p>在青春的赛道上奋勇向前。</p>
                <div class="quote">
                    "未来可期，是因为你一直在努力，</br>
                    生活可爱，是因为你始终在坚持。"
                </div>
                <p class="highlight">🌟 生日快乐！</p>
                <p>愿你的大学时光，</p>
                <p>既有诗和远方，</p>
                <p>也有脚踏实地的成长。</p>
                <p>愿你成为自己想要的模样！💫</p>
                <div class="stamp">
                    <div class="stamp-circle"></div>
                    <div class="stamp-inner">
                        <div class="stamp-text">
                            爱你的<br>哥哥
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="music-control" id="musicControl">
        🎵
    </div>

    <audio id="bgMusic" loop>
        <source src="assets/princess-music.mp3" type="audio/mpeg">
    </audio>

    <script>
        // 创建闪烁效果
        function createSparkles() {
            const sparklesContainer = document.getElementById('sparkles');
            const sparkleCount = 50;

            for (let i = 0; i < sparkleCount; i++) {
                const sparkle = document.createElement('div');
                sparkle.className = 'sparkle';
                sparkle.style.width = Math.random() * 5 + 'px';
                sparkle.style.height = sparkle.style.width;
                sparkle.style.left = Math.random() * 100 + 'vw';
                sparkle.style.top = Math.random() * 100 + 'vh';
                sparkle.style.animationDelay = Math.random() * 3 + 's';
                sparklesContainer.appendChild(sparkle);
            }
        }

        // 音乐控制
        const musicControl = document.getElementById('musicControl');
        const bgMusic = document.getElementById('bgMusic');
        let isMusicPlaying = false;

        musicControl.addEventListener('click', () => {
            if (isMusicPlaying) {
                bgMusic.pause();
                musicControl.textContent = '🎵';
            } else {
                bgMusic.play();
                musicControl.textContent = '⏸';
            }
            isMusicPlaying = !isMusicPlaying;
        });

        // 照片墙效果
        function createPhotoWall() {
            const container = document.getElementById('photoContainer');
            const photoCount = 8; // 照片数量
            const radius = 300; // 旋转半径

            const photos = [
                { img: 'https://picsum.photos/400/400?random=1', text: '每一个瞬间都是珍贵的回忆 ✨' },
                { img: 'https://picsum.photos/400/400?random=2', text: '愿你永远保持这份美好 🌟' },
                { img: 'https://picsum.photos/400/400?random=3', text: '时光定格下最灿烂的笑容 🎀' },
                { img: 'https://picsum.photos/400/400?random=4', text: '愿你的笑容永远如此灿烂 💫' },
                { img: 'https://picsum.photos/400/400?random=5', text: '珍藏美好时光 ✨' },
                { img: 'https://picsum.photos/400/400?random=6', text: '愿梦想成真 🌟' },
                { img: 'https://picsum.photos/400/400?random=7', text: '幸福永驻 💝' },
                { img: 'https://picsum.photos/400/400?random=8', text: '快乐相伴 🎈' }
            ];

            photos.forEach((photo, index) => {
                const angle = (index / photoCount) * Math.PI * 2;
                const photoItem = document.createElement('div');
                photoItem.className = 'photo-item';
                
                // 计算3D位置
                const x = Math.sin(angle) * radius;
                const z = Math.cos(angle) * radius;
                photoItem.style.transform = `translate(-50%, -50%) translateX(${x}px) translateZ(${z}px)`;

                // 创建正面（照片）
                const front = document.createElement('div');
                front.className = 'photo-front';
                const img = document.createElement('img');
                img.src = photo.img;
                img.alt = '生日照片';
                front.appendChild(img);

                // 创建背面（文字）
                const back = document.createElement('div');
                back.className = 'photo-back';
                back.innerHTML = `<p>${photo.text}</p>`;

                photoItem.appendChild(front);
                photoItem.appendChild(back);
                container.appendChild(photoItem);

                // 添加鼠标悬停事件
                photoItem.addEventListener('mouseenter', () => {
                    container.style.animationPlayState = 'paused';
                    photoItem.style.transform += ' rotateY(180deg) scale(1.2)';
                });

                photoItem.addEventListener('mouseleave', () => {
                    container.style.animationPlayState = 'running';
                    photoItem.style.transform = `translate(-50%, -50%) translateX(${x}px) translateZ(${z}px)`;
                });
            });
        }

        // 页面加载完成后初始化
        document.addEventListener('DOMContentLoaded', () => {
            createSparkles();
            createPhotoWall();
        });
    </script>
</body>
</html>
